<?php
ini_set('display_errors', 1);
error_reporting(-1);
require_once '/data/wwwroot/g_vendor/autoload.php';

use Biz\model\brand\BrandLink as mBrandLink;
use Biz\model\brand\Brand as mBrand;

//创建品牌主页短链
$list = mBrand::selectByWhere(['status' => mBrand::STATUS_USING, 'uid[>]' => 0], ['id', 'uid']);
foreach ($list as $row) {
    mBrandLink::createShortLink($row['id'], $row['uid']);
}